//统一管理用户相关的接口
import request from "@/utils/request";
//统一管理接口
enum API {
    MENULIST_URL = "/itp/api/menu",
    MENUURL_URL = "/itp/api/menuUrl"
} 
export default{
    getMenuList:(param:string) => request.get(`${API.MENULIST_URL}/menuPlan?dictMenuPlan=${param}`),//获取所有菜单
    addMenuItem:(param:any) => request.post(`${API.MENULIST_URL}/return/obj`,param),//新增菜单
    editMenuItem:(param:any) => request.put(API.MENULIST_URL,param),//修改菜单
    delMenuItem:(id:number) => request.delete(`${API.MENULIST_URL}?id=${id}`),//删除菜单
    moveMenuItem:(param:any)=>request.put(`${API.MENULIST_URL}/move`,param),//移动菜单
    
    getUrlIds:(menuPlan:any,id:any)=>request.get(`${API.MENUURL_URL}/bind?dictMenuPlan=${menuPlan}&menu=${id}`),//获取菜单已绑定url列表
    // updateBatchMenuUrl:(param: any) => request.put(`${API.MENUURL_URL}/batch`,param),
    updateBatchBindMenuUrl:(param: any) => request.put(`${API.MENUURL_URL}/bind`,param),

}